/************************************************************************************************* * * * MacZoop - "the framework for the rest of us" * * * * ZMenuBar.h -- the menubar manager object * * * * * * © 1996, Graham Cox * * * * *************************************************************************************************/ #pragma once #ifndef __ZMENUBAR__ #define __ZMENUBAR__ #include "ZComrade.h" #include "TextStyleUtils.h" #include class ZArray; // structure for storing info about a menu command typedef struct { long theCmd; // item's command short menuID; // menu ID short itemID; // item index short cmdFlags; // associated command flags short subMenuID; // if parent of submenu, menu we "own". MenuHandle macMenu; // actual handle of menu that owns this command } MenuCmd; // dimming options for entire menus: enum { neverDim = 0, dimCommands = 1, dimParentItems = 2, dimOthers = 4, dimAll = 8, dimTitle = 32 }; typedef unsigned char DimmingOptions; // structure for storing info about a whole menu: typedef struct { short menuID; // menu ID of the menu short mIndex; // index into original MBAR resource MenuHandle macMenu; // handle to the menu DimmingOptions mDimming; // dimming flags Boolean mIsResource; // TRUE if menu is a resource } MenuInfRec; #if PRAGMA_ALIGN_SUPPORTED #pragma options align=mac68k #endif // structure of CMNU resource: typedef struct { short menuID; long fill1; short procID; short fill2; unsigned long flags; char mTitle; } CMNUResource, *CMNUResPtr, **CMNUResHdl; // the items in the menu follow after the title, given the length of the title as // a number of bytes to skip forward. Each entry consists of the command item text // followed immediately by four bytes, , , ,